import request from "@/utils/request";

// 建筑设施列表 错误码300401
export function list(params) {
    return request({
        url: "/architecture/facilities/getFacilitiesPage",
        method: "get",
        params,
    });
}

// 新增建筑设施 错误码300402
export function addFacilities(data) {
    return request({
        url: "/architecture/facilities/addFacilities",
        method: "post",
        data,
    });
}

// 修改建筑设施 错误码300403
export function editFacilities(data) {
    return request({
        url: "/architecture/facilities/editFacilities",
        method: "put",
        data,
    });
}

// 建筑设施详情 错误码300404
export function detail(params) {
    return request({
        url: "/architecture/facilities/getFacilitiesById",
        method: "get",
        params,
    });
}

// 删除建筑设施 错误码300405
export function deleteFacilities(id) {
    return request({
        url: `/architecture/facilities/deleteFacilities/${id}`,
        method: 'delete',
    });
}

// 获取园区列表 错误码300406
export function getParkList(params) {
    return request({
        url: "/architecture/facilities/getParkList",
        method: "get",
        params,
    });
}

// 获取楼栋列表 错误码300407
export function getBuildingList(params) {
    return request({
        url: "/architecture/facilities/getBuildingList",
        method: "get",
        params,
    });
}

// 获取楼层列表 错误码300412
export function getFloorList(params) {
    return request({
        url: "/architecture/facilities/getFacilitiesPage",
        method: "get",
        params,
    });
}

// 获取房间布局列表 错误码300408
export function getArchitectureRoomList(params) {
    return request({
        url: "/architecture/facilities/getArchitectureRoomList",
        method: "get",
        params,
    });
}

//新增房间布局 错误码300409
export function addArchitectureRoom(data) {
    return request({
        url: "/architecture/facilities/addArchitectureRoom",
        method: "post",
        data,
    });
}

//修改房间布局 错误码300410
export function updateArchitectureRoom(data) {
    return request({
        url: "/architecture/facilities/updateArchitectureRoom",
        method: "put",
        data,
    });
}

// 删除房间布局 错误码300411
export function deleteArchitectureRoom(id) {
    return request({
        url: `/architecture/facilities/deleteArchitectureRoom/${id}`,
        method: 'delete',
    });
}
